<?phpclass UserPageDataService extends UserPageDSBase{	/**	 * Update status of page	 *	 * @access public	 *	 * @param int $id: Id of the page	 *	 * @return bool	 *	 */	public function updateStatus($id, $status)	{		$pageEntity = $this->beforeUpdate($id);		if ( !is_null($pageEntity)){			// Set news status			$pageEntity->status = (int) $status;			// Return result			return $this->update($pageEntity);		}	}		/**	 * 	 * Get Page content via UserId and type	 * @param string $userId	 * @param string $type	 */	public function getByUserAndType($userId,$type)	{		if(empty($userId) || empty($type)) return NULL;				$arrElement = array();		$arrElement["ownerId"] = $userId;		$arrElement["type"] = $type;				$items = $this->getItems($arrElement);		if(count($items) > 0)		{			return $items[0];		}		return NULL;	}	}